#include <iostream>
#include "mysqlclient.hpp"
#include <vector>
#include <string>
using std::cout;
using std::endl;
using std::string;
using std::vector;
namespace moqi
{

    void display(vector<vector<string>> vvec)
    {
        int m = vvec.size();
        int n = vvec[0].size();
        for (int i = 0; i < m; ++i)
        {
            for (int j = 0; j < n; ++j)
            {
                cout << vvec[i][j] << " ";
            }
            cout << endl;
        }
    }

    void test()
    {
        MySQLClient client;
        client.connect();
        string str = "select * from Teacher;";
        vector<vector<string>> res;
        res = client.readOperationQuery(str);
        if (res.size() != 0)
            display(res);
    }
}
int main()
{
    moqi::test();
    return 0;
}
